﻿#Set cmake version >= 3.0
cmake_minimum_required(VERSION 3.0)


#set project name = "qt_net_safe_tool"
project(QtNetSafeTool)



# set qt lib
#set(QT_PACKAGE_NAME Qt6 CACHE STRING "Set Qt package name, i.e. Qt5 or Qt6.")
find_package(Qt6 COMPONENTS Widgets Core Gui Qml Quick REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)



#add sub dir ...
add_subdirectory(MainWindow)
add_subdirectory(icon)



#set mian source dir = MAIN_DIR_SRC
aux_source_directory(. MAIN_DIR_SRC)
add_executable(QtNetSafeTool ${MAIN_DIR_SRC}) # set .exe name = qt_net_safe_tool, base on MAIN_DIR_SRC 



#target link lib ...
target_link_libraries(${PROJECT_NAME}  Qt6::Widgets Qt6::Core Qt6::Gui )
target_link_libraries(${PROJECT_NAME}  mianWindow)


#添加vtk 库
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
target_link_libraries(${PROJECT_NAME}  ${VTK_LIBRARIES})		

